/**
 * @Author admin
 * @Date 2019/3/22 9:14
 */

public class Collegestudent extends Student {
    Collegestudent(String name){
        super(name);
        this.type="专科生";
    }
    @Override
    public String calculateGrade() {
        float sum=(courses[0]+courses[1]+courses[2])/3;
        if (sum>=80){
            return "优秀";
        }
        else if (sum>=70&sum<80) {
            return "良好";
        }
        else if (sum>=60&sum<70){
            return "中等";
        }
        else if (sum>=50&sum<60){
            return "及格";
        }
        else {
            return "不及格";
        }
    }
}


